package com.gxa.modules.service.impl;

import com.gxa.common.vo.ResultVo;
import com.gxa.modules.mapper.EmpMapper;
import com.gxa.modules.pojo.Emp;
import com.gxa.modules.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: wangyifan
 * @Date: 2021/12/25 14:38
 * @Description: $end$
 * @Version: V1.0
 */
@Service
public class EmpServiceImpl implements EmpService {


        @Autowired(required = false)
        private EmpMapper EmpMapper;

        @Autowired
        private RedisTemplate redisTemplate;

        @Override
        public ResultVo findEmpList(Integer page, Integer limit) {
            ResultVo resultVo = new ResultVo();

            redisTemplate.opsForValue().set("name","王议帆");

            List<Emp> empList = EmpMapper.findEmpList();
            resultVo.setCode(200);
            resultVo.setMsg("查询成功");
            resultVo.setData(empList);
            return resultVo;
        }


}
